﻿@model BuildContext
@{
    var project = Model.Project;
}

FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM microsoft/dotnet:2.2-aspnetcore-runtime AS publish
WORKDIR /src
COPY /src .
RUN dotnet publish "@(project.Module)/@(project.Module).csproj" -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "@(project.Module).dll"]